The invention is in the field of measuring angular displacements and utilizing the resulting measurements in equipment such as in programmable limit switches and programmable controllers. More specifically the invention pertains to using resolvers to convert an angular displacement of a shaft to an analog electrical signal that carries information about such angular displacement, and further pertains to converting the analog signal to a digital signal for use in control functions, as used in Resolver-To-Digital (R/D) conversion. An example of a prior use of a resolver in a similar context is discussed in U.S. Pat. No. 4,511,884 naming the inventor herein as a coinventor. One example of a programmable limit switch utilizing a resolver is the iPLC-1 model available from Advanced Micro Controls, Inc., Route 47, Washington Depot, CT 06794, discussed in a brochure dated 5/88 and a data sheet which are hereby incorporated by reference in this specification.
A resolver can be the transducer of choice particularly in harsh environment such as in manufacturing plants because it tends to be reliable and stable and is unaffected by the typically encountered changes in voltage, frequency, temperature and aging. A resolver typically has a rotor on a shaft which is mechanically coupled to undergo the angular displacement of interest. The rotor carries a reference winding and rotates in a stator which typically has a pair of output windings which are spatially at an angle to each other. Typically, the rotor winding is excited with a sinusoidal reference voltage, which induces in the stator windings a pair of sinusoidally varying voltages which are at the frequency of the reference voltage but tend to be delayed in phase relative to the reference sine wave and have amplitudes proportional respectively to the sine and cosine of the angular position of the rotor relative to the stator. The ratio of these two voltages in the output windings corresponds to the tangent of the angular position of the rotor relative to the stator, and this ratio can be digitized and used, e.g., for control functions. The resolver's output waveforms can be measured using the synchronous sample-and-hold approach, in which they are sampled at their peaks in sync with the reference voltage and the sampled voltages are held until the next sample period. The samples can be used as a representation of the demodulated resolver output.
The accuracy of resolvers can be adversely affected by quadrature effects (leakage of the sine wave output into the cosine wave output) and second harmonics voltages. To reduce such undesirable effects, an effort can be made to place the sample period exactly at the 90 degree point of the resolver's sinusoidally shaped output waveform. However, where this point is depends on the individual characteristics of a resolver and can vary due to manufacturing tolerances and other factors. Accordingly, this approach requires knowledge of the transfer function of the particular resolver, derived for example by individually testing R/D converters in the manufacturing process or in the field. Needless to say, this has been an undesirable burden in the manufacture and servicing of R/D converters.
This invention takes a different approach. In accordance with the invention an R/D converter need not depend on post-manufacture or post-service tests and adjustments of discrete components in order to accommodate the transfer function of the particular resolver used. Instead, an R/D converter in accordance with the invention inherently accommodates relatively wide variations in the transfer functions of resolvers and still functions accurately. Specifically, upon power up an R/D converter in accordance with the invention first determines by itself the correct time to sample the resolver's outputs based on the relevant characteristics of the resolver in the circuit and only then commences using the resolver's outputs to measure shaft angle. In addition, an R/D converter in accordance with the invention further improves accuracy by adjusting the amplitude of the reference wave to ensure that the amplitude of the output waveforms would be just within the dynamic range of the analog-to-digital (A/D) converter which is a part of the R/D converter.
In an exemplary and nonlimiting embodiment of the invention, the resolver's reference winding is driven with a reference sine wave derived by filtering and power amplifying a reference square wave produced by an integrated circuit (IC) microcontroller such as from the Intel MCS-96 family, the TI TMS320C14 family, the Motorola 68HC11 family, or a similar device. A characteristic of such microcontrollers is that they have a High-Speed Input/Output (HSI/O) device as a part of the IC, which can measure time intervals between signal transitions on designated High-Speed (HS) inputs and can change the state on designated HS outputs at programmed time intervals without the intervention of the CPU which is a part of the same IC.
In accordance with the invention, upon power up the R/D converter first adjusts itself to the transfer function of the resolver and only then starts its normal operation of measuring angular displacement. To this end, the converter drives the resolver with the reference sine waveform derived from the HS output of the microcontroller, which sine waveform has a known frequency but an unknown phase relative to the reference square wave. The circuit responds to the crossing of a reference voltage line (e.g., zero voltage) by this reference sine waveform to find the phase delay of the reference sine waveform relative to the reference square wave. The circuit then uses this phase difference to calculate the 90 degree point on the reference sine wave, using as a part of this calculation the known common frequency of the square and sine reference waves. The circuit then finds when the larger of the sine and cosine output waves of the resolver crosses a reference voltage (e.g., zero volts) and on that basis as well as on the basis of the known common frequency of the reference waves and the resolver output waves, computes the phase difference or delay between the reference sine wave and the larger output wave and on that basis determines the 90 degree point at which the resolver output waves should be sampled to avoid or at least reduce undesirable quadrature and second harmonic effects. Further, the R/D converter in accordance with the invention controls the amplitude of the reference sine wave such that the resolver's output waves would have amplitudes that use the full range of the analog-to-digital (A/D) converter which digitizes these waves, to further improve accuracy. In an alternate embodiment, the principles of the invention are used in an R/D converter that uses a single microcontroller IC connected to multiple resolvers. The goal in such a multiple resolver R/D converter is to have the single microcontroller find and use a resolver transfer function parameter that can accommodate all of the resolvers which are a part of the converter, which is practical when the resolvers are sufficiently close though not identical in their relevant transfer function parameters.